xen/arm: p2m: fix pa_range_info for 52-bit pa range
authorXenia Ragiadakou <burzalodowa@gmail.com>
Wed, 19 Oct 2022 14:49:13 +0000 (17:49 +0300)
committerJulien Grall <jgrall@amazon.com>
Fri, 21 Oct 2022 10:15:25 +0000 (11:15 +0100)
commit974c8d810a1daacb3322015cd1c124d26155fc75
treee5ddd46043649d0e7cd152f451e1ac9268fe572b
parente0347046445a2c6245f6a04093e7e831100611a1
xen/arm: p2m: fix pa_range_info for 52-bit pa range

Currently, the fields 'root_order' and 'sl0' of the pa_range_info for
the 52-bit pa range have the values 3 and 3, respectively.
This configuration does not match any of the valid root table configurations
for 4KB granule and t0sz 12, described in ARM DDI 0487I.a D8.2.7.

More specifically, according to ARM DDI 0487I.a D8.2.7, in order to support
the 52-bit pa size with 4KB granule, the p2m root table needs to be configured
either as a single table at level -1 or as 16 concatenated tables at level 0.
Since, currently there is no support for level -1, set the 'root_order' and
'sl0' fields of the 52-bit pa_range_info according to the second approach.

Note that the values of those fields are not used so far. This patch updates
their values only for the sake of correctness.

Fixes: 407b13a71e32 ("xen/arm: p2m don't fall over on FEAT_LPA enabled hw")
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
xen/arch/arm/p2m.c